import 'package:zrjz/generated/json/base/json_convert_content.dart';
import 'package:zrjz/entity/response/user_profile.dart';

UserProfile $UserProfileFromJson(Map<String, dynamic> json) {
	final UserProfile userProfile = UserProfile();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		userProfile.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		userProfile.name = name;
	}
	final String? phone = jsonConvert.convert<String>(json['phone']);
	if (phone != null) {
		userProfile.phone = phone;
	}
	final String? avatar = jsonConvert.convert<String>(json['avatar']);
	if (avatar != null) {
		userProfile.avatar = avatar;
	}
	final String? passwordType = jsonConvert.convert<String>(json['password_type']);
	if (passwordType != null) {
		userProfile.passwordType = passwordType;
	}
	final dynamic registrationId = jsonConvert.convert<dynamic>(json['registration_id']);
	if (registrationId != null) {
		userProfile.registrationId = registrationId;
	}
	return userProfile;
}

Map<String, dynamic> $UserProfileToJson(UserProfile entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['phone'] = entity.phone;
	data['avatar'] = entity.avatar;
	data['password_type'] = entity.passwordType;
	data['registration_id'] = entity.registrationId;
	return data;
}